class CreatePermissionsResources < ActiveRecord::Migration
  def self.up
    create_table :permissions_resources, :id => false do |t|
        t.references :permission
        t.references :resource
    end
    add_index :permissions_resources, [:permission_id, :resource_id]
    add_index :permissions_resources, [:resource_id, :permission_id] 
  end

  def self.down
    drop_table :permissions_resources
  end

end